package ar.com.rpsoftware.classes;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import ar.com.rpsoftware.fixturebrasil2014.R;

public class MatchesFragment extends Fragment {

	@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
     
		// Creo la vista
		ViewGroup root = (ViewGroup) inflater.inflate(R.layout.matches_fragment_layout, container, false);
        
		// Obtengo datos
        Bundle data = getArguments();
        
        int number = data.getInt("number");
        
        TextView txt = (TextView) root.findViewById(R.id.txtMatches);
        
        if(number == 0) {
        	txt.setText("Partidos, soy el frame " + String.valueOf(number + 1));
        } else if(number == 1) {
        	txt.setText("Posiciones, soy el frame " + String.valueOf(number + 1));
        } else {
        	txt.setText("No se que numero soy");
        }
        
        return root;
    }	
}
